﻿Imports capaNegocios

Public Class secCurso
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Page.IsPostBack = False Then
            Me.CargarComboCurso()
        End If
    End Sub

    Private Sub CargarComboCurso()
        Dim objCurso As clsCurso = New clsCurso()
        Me.ddlCursoBuscar.Items.Clear()
        For Each fila As DataRow In objCurso.Buscar.Rows
            Me.ddlCursoBuscar.Items.Add(New ListItem(fila("CUR_Nombre"), fila("CUR_ID")))
        Next
    End Sub

    Protected Sub btnAgregarCurso_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAgregarCurso.Click
        Response.Redirect("secCurso_agregar.aspx")
    End Sub

    Protected Sub btnModificarCurso_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnModificarCurso.Click
        Response.Redirect("secCurso_modificar.aspx?codCurso=" & Me.ddlCursoBuscar.SelectedValue.ToString)
    End Sub
End Class